﻿using System.Web;
using System.Web.Optimization;

namespace Front
{
    public class BundleConfig
    {
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/3rdparty").Include(
                        "~/Scripts/jquery-{version}.js",
                        "~/Scripts/angular.min.js",
                        "~/Scripts/angular-route.min.js",
                        "~/Scripts/angular-sanitize.min.js",
                        "~/Scripts/jquery.validate*",
                        "~/Scripts/bootstrap.js",
                        "~/Scripts/respond.js",
                        "~/Scripts/underscore.js",
                        "~/Scripts/toastr.min.js",
                        "~/Scripts/ui-bootstrap-tpls-0.11.0.js"
                        ));
            
            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(                        
                        "~/Scripts/jquery.validate*"
                        ));

            bundles.Add(new ScriptBundle("~/bundles/lib").Include(
                        "~/Scripts/Lib/init.js",
                        "~/Scripts/Lib/notification.js",
                        "~/Scripts/Lib/arrUtil.js"
            ));

            bundles.Add(new ScriptBundle("~/bundles/module").Include(
                        "~/Scripts/Module/init.js",            
                        "~/Scripts/Module/pageState.js",
                        "~/Scripts/Module/cache.js",
                        "~/Scripts/Module/config.js",
                        "~/Scripts/Directives/ngEnter.js",
                        "~/Scripts/Directives/ngFocusWhen.js",
                        "~/Scripts/Directives/ngDownloadButton.js"
                        ));

            bundles.Add(new ScriptBundle("~/bundles/list").Include(
                        "~/Scripts/List/articleListCtrl.js",                        
                        "~/Scripts/List/articleAddCtrl.js"
            ));

            bundles.Add(new ScriptBundle("~/bundles/article").Include(
                        "~/Scripts/Article/articleEditCtrl.js",                        
                        "~/Scripts/Article/columnEditCtrl.js",
                        "~/Scripts/Article/columnSvc.js",
                        "~/Scripts/Article/articleSvc.js"                        
            ));
            
            bundles.Add(new ScriptBundle("~/bundles/item").Include(
                        "~/Scripts/Item/itemSvc.js",                        
                        "~/Scripts/Item/simpleEditCtrl.js",
                        "~/Scripts/Item/simpleListCtrl.js",
                        "~/Scripts/Item/simpleFilterCtrl.js",
                        "~/Scripts/Item/tabularListCtrl.js",
                        "~/Scripts/Item/tabularEditCtrl.js",
                        "~/Scripts/Item/tabularFilterCtrl.js"                        
            ));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/font-awesome.css",
                      "~/Content/toastr.css",
                      "~/Content/base.css",
                      "~/Content/layout.css"                      
                      ));
            bundles.Add(new StyleBundle("~/Content/home").Include(                      
                      "~/Content/home.css"
                      ));
            bundles.Add(new StyleBundle("~/Content/account").Include(                      
                      "~/Content/account.css"
                      ));
        }
    }
}
